package com.example.xd.mvp_project.adapter;

import android.content.Context;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.example.xd.mvp_project.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;



/**
 * @auther XuDan on 2018/10/23.
 */
public class MainHeadRecycleAdapter extends BaseQuickAdapter<Integer, BaseViewHolder> {
    Context context;

    public MainHeadRecycleAdapter(int layoutResId, @Nullable List<Integer> data, Context context) {
        super(layoutResId, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, Integer item) {
        ImageView img = helper.getView(R.id.main_head_item_img);
        Glide.with(context).load(item).into(img);
    }
}
